<template>
  <div>
    <p>姓名：{{name}}</p>
    <button @click="handleClick">点击我</button>
  </div>
</template>

<!-- lang="ts" 添加对typescript的支持 -->
<!-- setup：使用setup语法糖-->
<script lang="ts" setup>
    import {ref} from "vue";

    let name = ref("罗佰君");

    let handleClick = function() {
        console.log("我被点击了")
    }

</script>

<style scoped>

</style>